/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ReportesCoordServClienteUI.java
 *
 * Created on 28/06/2009, 12:02:13 AM
 */

package CRM_UI;

import DAO.DAOCasoServicioCliente;
import DAO.DAOCliente;
import DAO.DAOEmpleado;
import java.util.Vector;

/**
 *
 * @author L¡z
 */
public class ReportesCoordServClienteUI extends javax.swing.JFrame {

    /** Creates new form ReportesCoordServClienteUI */
    Vector <String> listaClientes = new Vector <String>();
    Vector <Vector> clientes;
    Vector <String> listaRSC = new Vector <String>();
    Vector <Vector> rsc;
    Vector <String> columnasTabla = new Vector <String>();
    Vector <Vector> datosTabla = new Vector <Vector>();
    String labelTabla = "";

    public ReportesCoordServClienteUI()
    {
        inicializarClientes();
        inicializarRSC();
        columnasTabla.addElement("Id CSC");
        columnasTabla.addElement("Descripcion");
        initComponents();
        setLocationRelativeTo(null);
    }

    public void inicializarClientes()
    {
        DAOCliente objDaoCliente = new DAOCliente();
        clientes = objDaoCliente.nombresClientes();

        listaClientes.addElement("          -          ");

        for(int i=1; i<clientes.size(); i++)
        {
            listaClientes.addElement(clientes.elementAt(i).elementAt(0).toString()+" - "
                                    +clientes.elementAt(i).elementAt(1).toString());
        }
    }

    public void inicializarRSC()
    {
        DAOEmpleado objDaoEmpleado = new DAOEmpleado();
        rsc = objDaoEmpleado.nombresRSC();

        listaRSC.addElement("          -          ");

        for(int i=1; i<rsc.size(); i++)
        {
            listaRSC.addElement(rsc.elementAt(i).elementAt(0).toString()+" - "
                                    +rsc.elementAt(i).elementAt(1).toString());
        }
        
    }

    public void generarReporteCSC()
    {
        Vector <String> columnas = new Vector <String>();
        Vector <String> atributos = new Vector <String>();
        Vector <String> valores = new Vector <String>();
        String aNo = aNoCSCComboBox.getSelectedItem().toString();
        String fechaInicio = "";
        String fechaFin = "";

        if( mesCSCComboBox.getSelectedIndex() == 0 )
        {
            fechaInicio = "01"+"-"+"01"+"-"+aNo;
            fechaFin = "31-"+"12-"+aNo;
        }
        else
        {
            if(mesCSCComboBox.getSelectedIndex() <= 9)
            {
                fechaInicio = "01-"+"0"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
                fechaFin = "31-"+"0"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
            }
            else
            {
                fechaInicio = "01-"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
                fechaFin = "31-"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
            }
        }

        if( tipoComboBox.getSelectedIndex() == 0 )
        {
            columnas.addElement("tipo_csc");
            columnasTabla.addElement("Tipo");
        }
        else
        {
          atributos.addElement("tipo_csc");
          valores.addElement(tipoComboBox.getSelectedItem().toString());
        }

        if( estadoCSCComboBox.getSelectedIndex() == 0 )
        {
            columnas.addElement("estado_csc");
            columnasTabla.addElement("Estado");
        }
        else
        {
            atributos.addElement("estado_csc");
            valores.addElement(estadoCSCComboBox.getSelectedItem().toString());
        }

        if( prioridadComboBox.getSelectedIndex() == 0 )
        {
            columnas.addElement("nivel_prioridad_csc");
            columnasTabla.addElement("Nivel de Prioridad");
        }
        else
        {
            atributos.addElement("nivel_prioridad_csc");
            valores.addElement(prioridadComboBox.getSelectedItem().toString());
        }

        if( calificacionComboBox.getSelectedIndex() == 0 )
        {
            columnas.addElement("calificacion_csc");
            columnasTabla.addElement("Calificación");
        }
        else
        {
            atributos.addElement("calificacion_csc");
            valores.addElement(calificacionComboBox.getSelectedItem().toString());
        }

        if( clientesComboBox.getSelectedIndex() != 0 )
        {
            atributos.addElement("id_cliente");
            valores.addElement(clientes.elementAt(clientesComboBox.getSelectedIndex()).elementAt(0).toString());
        }
        
        if( rscComboBox.getSelectedIndex() == 0 )
        {
            columnas.addElement("cc_empleado");
            columnasTabla.addElement("Empleado");
        }
        else
        {
            atributos.addElement("cc_empleado");
            valores.addElement(rscComboBox.getSelectedItem().toString());
        }

        columnasTabla.addElement("Duracion (días)");

        DAOCasoServicioCliente objDaoCSC = new DAOCasoServicioCliente();
        datosTabla = objDaoCSC.reporteCSC(columnas,fechaInicio,fechaFin,atributos,valores);

        if(datosTabla.size() != 0)
        {
            Vector <Vector> estadisticas = objDaoCSC.estadisticasCSC();
            labelTabla = "Cantidad: "+estadisticas.elementAt(0).elementAt(0).toString()+
                         "\t Duración Promedio: "+estadisticas.elementAt(0).elementAt(1).toString();
        }

    }

    public void generarReporteClientes()
    {
        String aNo = aNoClientesComboBox.getSelectedItem().toString();
        String fechaInicio = "";
        String fechaFin = "";
        String estadoCliente = "";

        columnasTabla.addElement("Identificador");
        columnasTabla.addElement("Nombre");

        if( mesCSCComboBox.getSelectedIndex() == 0 )
        {
            fechaInicio = "01"+"-"+"01"+"-"+aNo;
            fechaFin = "31-"+"12-"+aNo;
        }
        else
        {
            if(mesCSCComboBox.getSelectedIndex() <= 9)
            {
                fechaInicio = "01-"+"0"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
                fechaFin = "31-"+"0"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
            }
            else
            {
                fechaInicio = "01-"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
                fechaFin = "31-"+mesCSCComboBox.getSelectedIndex()+"-"+aNo;
            }
        }

        if( estadoClienteComboBox.getSelectedIndex() == 0 )
        {
            columnasTabla.addElement("Estado");
        }
        else
        {
            estadoCliente = estadoCSCComboBox.getSelectedItem().toString();
        }

        DAOCliente objDaoCliente= new DAOCliente();
        datosTabla = objDaoCliente.reporteClientes(estadoCliente,fechaInicio, fechaFin);
        Vector <Vector> cantidad = objDaoCliente.estadisticasClientes();
        labelTabla = "Cantidad: "+cantidad.elementAt(0).elementAt(0);

    }

    public void generarReporteRSC()
    {
        columnasTabla.addElement("Cédula Empleado");
        columnasTabla.addElement("Nombre Empleado");
        columnasTabla.addElement("Total de Casos");
        columnasTabla.addElement("Promedio por Caso (días)");

        DAOEmpleado objDaoEmpleado = new DAOEmpleado();
        datosTabla= objDaoEmpleado.reporteRSC();
        int maximo = Integer.parseInt(objDaoEmpleado.maximoRSC().elementAt(0).elementAt(0).toString());
        int minimo = Integer.parseInt(objDaoEmpleado.minimoRSC().elementAt(0).elementAt(0).toString());
        labelTabla = "Minimo: "+minimo+"  Maximo: "+maximo;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        reportesButtonGroup = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        cscRadioButton = new javax.swing.JRadioButton();
        jLabel1 = new javax.swing.JLabel();
        clientesRadioButton = new javax.swing.JRadioButton();
        rscRadioButton = new javax.swing.JRadioButton();
        generarButton = new javax.swing.JButton();
        fechaCSCLabel = new javax.swing.JLabel();
        mesCSCComboBox = new javax.swing.JComboBox();
        aNoCSCComboBox = new javax.swing.JComboBox();
        tipoLabel = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        prioridadComboBox = new javax.swing.JComboBox();
        estadoCSCComboBox = new javax.swing.JComboBox();
        tipoComboBox = new javax.swing.JComboBox();
        jComboBox6 = new javax.swing.JComboBox();
        calificacionComboBox = new javax.swing.JComboBox();
        clientesComboBox = new javax.swing.JComboBox(listaClientes);
        jLabel8 = new javax.swing.JLabel();
        rscComboBox = new javax.swing.JComboBox(listaRSC);
        jLabel9 = new javax.swing.JLabel();
        mesClientesComboBox = new javax.swing.JComboBox();
        jLabel10 = new javax.swing.JLabel();
        estadoClienteComboBox = new javax.swing.JComboBox();
        aNoClientesComboBox = new javax.swing.JComboBox();

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Reportes"));

        reportesButtonGroup.add(cscRadioButton);
        cscRadioButton.setText("Clasificación de los Casos de Servicio al Cliente");
        cscRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cscRadioButtonActionPerformed(evt);
            }
        });

        jLabel1.setText("Seleccione el reporte que desea generar:");

        reportesButtonGroup.add(clientesRadioButton);
        clientesRadioButton.setText("Estadísticas Clientes");
        clientesRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clientesRadioButtonActionPerformed(evt);
            }
        });

        reportesButtonGroup.add(rscRadioButton);
        rscRadioButton.setText("Estadísticas Representantes de Servicio al Cliente");

        generarButton.setText("generar");
        generarButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                generarButtonActionPerformed(evt);
            }
        });

        fechaCSCLabel.setText("fecha:");

        mesCSCComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "         -         ", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" }));

        aNoCSCComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009" }));
        aNoCSCComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                aNoCSCComboBoxActionPerformed(evt);
            }
        });

        tipoLabel.setText("tipo:");

        jLabel5.setText("calificación:");

        jLabel6.setText("estado:");

        jLabel3.setText("prioridad:");

        jLabel7.setText("cliente:");

        prioridadComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "     -", "Baja", "Normal", "Alta" }));

        estadoCSCComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "          -", "Iniciado", "En Proceso", "Resulto", "No Resuelto" }));

        tipoComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "                                   -", "Quejas y Reclamos", "Consulta de Pedidos y/o Servicios Adquiridos", "Oportunidades de Negocio", "Cancelación de Servicios" }));

        jComboBox6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        calificacionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "        -", "Excelente", "Buena", "Regular", "Mala" }));

        jLabel8.setText("rsc:");

        jLabel9.setText("fecha:");

        mesClientesComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "        -", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" }));

        jLabel10.setText("estado:");

        estadoClienteComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "       -", "Activo", "Retirado" }));

        aNoClientesComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009" }));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rscRadioButton)
                            .addComponent(cscRadioButton)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(21, 21, 21)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel7)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel6)
                                    .addComponent(tipoLabel)
                                    .addComponent(fechaCSCLabel))
                                .addGap(19, 19, 19)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(prioridadComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(estadoCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tipoComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(mesCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(aNoCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(calificacionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(clientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(rscComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 194, Short.MAX_VALUE)
                                .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(113, 113, 113))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(clientesRadioButton)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(21, 21, 21)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel10)
                                            .addComponent(jLabel9))
                                        .addGap(13, 13, 13)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(estadoClienteComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(mesClientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(aNoClientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                                .addGap(158, 158, 158))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(140, 140, 140)
                        .addComponent(generarButton))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(cscRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fechaCSCLabel)
                    .addComponent(mesCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(aNoCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tipoLabel)
                            .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel6))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(tipoComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(estadoCSCComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(prioridadComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(calificacionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(clientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(rscComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(clientesRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(mesClientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(aNoClientesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addComponent(jLabel10))
                    .addComponent(estadoClienteComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(rscRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(generarButton)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    private void cscRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cscRadioButtonActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_cscRadioButtonActionPerformed

    private void clientesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clientesRadioButtonActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_clientesRadioButtonActionPerformed

    private void generarButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generarButtonActionPerformed
        // TODO add your handling code here:
        if( cscRadioButton.isSelected() )
        {
            datosTabla.clear();
            columnasTabla.clear();
            labelTabla="";
            columnasTabla.addElement("Identificador");
            columnasTabla.addElement("Descripcion");
            generarReporteCSC();
        }
        if( clientesRadioButton.isSelected() )
        {
            datosTabla.clear();
            columnasTabla.clear();
            labelTabla="";
            generarReporteClientes();
        }
        if( rscRadioButton.isSelected() )
        {
            datosTabla.clear();
            columnasTabla.clear();
            labelTabla="";
            generarReporteRSC();
        }

        TablaReportesUI tabla = new TablaReportesUI(datosTabla, columnasTabla,labelTabla);
            tabla.setVisible(true);
}//GEN-LAST:event_generarButtonActionPerformed

    private void aNoCSCComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aNoCSCComboBoxActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_aNoCSCComboBoxActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ReportesCoordServClienteUI().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox aNoCSCComboBox;
    private javax.swing.JComboBox aNoClientesComboBox;
    private javax.swing.JComboBox calificacionComboBox;
    private javax.swing.JComboBox clientesComboBox;
    private javax.swing.JRadioButton clientesRadioButton;
    private javax.swing.JRadioButton cscRadioButton;
    private javax.swing.JComboBox estadoCSCComboBox;
    private javax.swing.JComboBox estadoClienteComboBox;
    private javax.swing.JLabel fechaCSCLabel;
    private javax.swing.JButton generarButton;
    private javax.swing.JComboBox jComboBox6;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JComboBox mesCSCComboBox;
    private javax.swing.JComboBox mesClientesComboBox;
    private javax.swing.JComboBox prioridadComboBox;
    private javax.swing.ButtonGroup reportesButtonGroup;
    private javax.swing.JComboBox rscComboBox;
    private javax.swing.JRadioButton rscRadioButton;
    private javax.swing.JComboBox tipoComboBox;
    private javax.swing.JLabel tipoLabel;
    // End of variables declaration//GEN-END:variables

}
